package ch.fhnw.qualiscan.core.db.pojos;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * This pojo holds the information about surveys. It is used by hibernate to get data out of the database.
 * @author Kevin Mettenberger
 *
 */
@SuppressWarnings("serial")
public class Survey implements Serializable {
	
	private int id;
	private String title = "";
	private Set domains = new HashSet();
	private Stage stage;
	private Date creationdate;
	private Date completiondate;
	private University university;
        private Questionnaire questionnaire;
	
	public Survey() {}
	
	public int getId() {
		return id;
	}
	
	public void setId(int id) {
		this.id = id;
	}
	
	public String getTitle() {
		return title;
	}
	
	public void setTitle(String title) {
		this.title = title;
	}

	public Set getDomains() {
		return domains;
	}

	public void setDomains(Set domains) {
		this.domains = domains;
	}
	
	public void addDomain(Domain domain) {
		this.domains.add(domain);
	}
	
	public void removeDomain(Domain domain) {
		this.domains.remove(domain);
	}
	
	public Stage getStage() {
		return stage;
	}

	public void setStage(Stage stage) {
		this.stage = stage;
	}

	public Date getCreationdate() {
		return creationdate;
	}

	public void setCreationdate(Date creationdate) {
		this.creationdate = creationdate;
	}

	public Date getCompletiondate() {
		return completiondate;
	}

	public void setCompletiondate(Date completiondate) {
		this.completiondate = completiondate;
	}

	public University getUniversity() {
		return university;
	}

	public void setUniversity(University university) {
		this.university = university;
	}

    /**
     * @return the questionnaire
     */
    public Questionnaire getQuestionnaire() {
        return questionnaire;
    }

    /**
     * @param questionnaire the questionnaire to set
     */
    public void setQuestionnaire(Questionnaire questionnaire) {
        this.questionnaire = questionnaire;
    }
	
	
	
	
	
}